<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
/**
 * HTML View class for the HelloWorld Component
 *
 * @package    HelloWorld
 */
class SetViewStoreform extends JView
{
    function display($tpl = null)
    {
    	$model		= &$this->getModel();
        $store        =& $this->get('Data','store');   
	    $isNew        = ($store->id < 1);
	    $text = $isNew ? JText::_( 'New' ) : JText::_( 'Edit' );
	    JToolBarHelper::title(   JText::_( 'Taobao Store' ).': <small><small>[ ' . $text.' ]</small></small>' );
	    JToolBarHelper::save();
	    if ($isNew)  {
	        JToolBarHelper::cancel();
	    } else {
	        // for existing items the button is renamed `close`
	        JToolBarHelper::cancel( 'cancel', 'Close' );
	    }
	    $this->assignRef('store', $store);
	    parent::display($tpl);
    }    
}

?>